<%-- 
    Document   : showuserajax
    Created on : Jan 4, 2014, 3:02:53 PM
    Author     : THICH HOA DONG TIEN
--%>

<%@page import="bc.entity.User"%>
<%@page import="java.util.List"%>
<%@page import="businesscard.DAO.UserDAO"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
           String e= request.getParameter("search");
            UserDAO urdao = new UserDAO();
       // List<String> arr= new ArrayList<>();
        List<User> list = urdao.searchlikename(e);
        for(int i=0; i<list.size(); i++)
        {
            String ten = list.get(i).getUser();
            String email=list.get(i).getEmail();
            String url= list.get(i).getHinhanh();
            String quyen =list.get(i).getQuyen().getQuyen();
            %>
            <div class="show" align="left">
               <image src="avatar/<%=url%>" style="width:50px; height:50px; float:left; margin-right:6px;" /><span class="name"><%=ten%></span>&nbsp;<br/><%=email%><br/>
            </div>
            <%
        }
        %>
    </body>
</html>
